
#ifndef GLOBALSENSOR_TC_STORE_TEST_H_
#define GLOBALSENSOR_TC_STORE_TEST_H_

#include <public/PackMemManager.h>
#include <public/ssi_link_layer.h>
#include <public/sgi_link_layer.h>
#include <iostream>
using namespace std;



#define MAX_BYTES_FROM_FILE 30

uint64_t fileSize( const char* filePath );

class CTestSGI_SensorTC{


    char * m_fileNames[2];
    //char * m_files[2];
	//ifstream file;
	uint16_t m_sensorIds[2];
	uint64_t m_filePendingBytes[2];
	uint64_t size[2];
	uint8_t index;



public:

	CTestSGI_SensorTC(){
		index=0;
		//Inicializo los m_fileNames con 6 nombres de archivos
       // char * m_fileNames[] = {
		//		"./test_files/aaa.txt",
		//		"./test_files/bbb.txt"
		//};
         m_fileNames[0]="./test_files/aaa.txt";
         m_fileNames[1]="./test_files/bbb.txt";


		//Abro los 6 archivos  m_files
		//for (int i=0;i<2;i++){
			//ifstream file(m_fileNames[i], ios::binary);
			//ifstream m_files[1](m_fileNames[1], ios::binary);
			//file.open(m_fileNames[i], ios::binary);

		//}
        //ifstream file("./test_files/tranquilidad.jpeg", ios::binary);
        //ifstream file1("./test_files/verano.jpeg", ios::binary);
		//asigno mediante un random un identificador distinto a los 6 sensores y
		//lo guardo en el array m_sensorIds
		m_sensorIds[0]=1;
		m_sensorIds[1]=2;
		// inicializo m_filePendingBytes con el tamaño de cada archivos.
		m_filePendingBytes[0]=fileSize("./test_files/aaa.txt");
		m_filePendingBytes[1]=fileSize("./test_files/bbb.txt");

		size[0]=fileSize("./test_files/aaa.txt");
		size[1]=fileSize("./test_files/bbb.txt");

	}
	bool buildPack(CPackHandler &pack);


};

#endif
